<?php
namespace App\Http\Service\Blog;


use App\Http\Service\Basic\BasicService;
use Config;

class BlogService extends BasicService
{

    //构造函数
    function __construct()
    {
        parent::__construct();
    }

    //添加博客
    public function addBlog($where = array())
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.add_blog'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.add_blog'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    //博客列表
    public function getBlogList($where = array())
    {
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.get_blog_list'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    public function previewBlog($where = array())
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.preview_blog'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.preview_blog'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');

    }





}